﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BlobNet.Base.Common;
using BlobNet.TestsCommon.UnitTests.Dummy;
using BlobNet.TestsCommon.Utils;
using NUnit.Framework;

namespace BlobNet.Base.Tests.UnitTests
{
    [TestFixture]
    [Category("Unit Tests")]
    class ObjectBuilderTests
    {
        [Test]
        public void Can_Create_BlobPart_WithPrivate_EmptyConstructor()
        {
            var blobDomain = TestsHelper.GetDummyBlobDomain();
            Guid entityId = Guid.NewGuid();
            BlobPart target =(BlobPart) ObjectBuilder.Default.GetNewInstance( typeof(DummyBlobPartWithPrivateEmptyConstructor).FullName,blobDomain, entityId);

            Assert.IsNotNull(target);
            Assert.IsTrue(entityId.ToString() == target.EntityId.ToString());
        }

    }
}
